<?php
	
/* 
	
	dkpm - a DKP management system
	
	The contents of this file are subject to the Mozilla Public License
	Version 1.1 (the "License"); you may not use this file except in
	compliance with the License. You may obtain a copy of the License at
	http://www.mozilla.org/MPL/

	Software distributed under the License is distributed on an "AS IS"
	basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the
	License for the specific language governing rights and limitations
	under the License.
	
	The Original Code is Copyright (C) 2007 Martin Wedvich. All Rights Reserved.
	
	-
	
	analyzelog.php
	This page deals with extracting and displaying data from uploaded combat logs.

*/
	
	define('dkpm', true);
	session_start();
	
	require 'functions.php';
	require 'framework.php';
	
	$sql = mysql_query('SELECT raid_id, raid_start FROM dkpm_raids');
	
	while($row = mysql_fetch_row($sql)) {
	 	$timestamp = timestamp($row[1]);
		$rows .= '			
									<tr class="row">
										<td width="96"><a href="viewraid.php?raid=' . $row[0] . '" title="View raid #' . $row[0] . '">Raid #' . $row[0] . '</a></td>	
										<td>' . date(DATE_RSS, $timestamp) . '</td>
									</tr>';
	}
	$content = '
					<p>There are ' . mysql_num_rows($sql) . ' raids in the database.</p>
					<table width="100%" cellspacing="0" cellpadding="3">	
						<tr>
							<td width="96">ID</td>	
							<td>Time</td>		
						</tr>	
					</table>
					<table bgcolor="#96BA32" width="100%" cellspacing="0" cellpadding="0">		
						<tr>
							<td width="100%">
								<table width="100%" cellspacing="1" cellpadding="2">' . $rows . '
								</table>
							</td>
						</tr>
					</table>';
	
	$title = 'dkpm &raquo; Combat logs';
	$content = '<div id="subcontent" class="nomenu">
					' . $content . '
				</div>';
		
	framework_exec($title, $content);

?>